home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0" encoding="utf-8"?> <html><head><title>Str Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03120103"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css"> p.P1{ } p.P2{ } span.T1{ font-weight:bold;} </style></head><body> <help:to-be-embedded Eid="str" xmlns:help="http://openoffice.org/2000/help"> <p class="Head1"><help:link Id="66564">Str Function [Runtime]</help:link></p> <p class="Paragraph">Converts a numeric expression to a string.</p> </help:to-be-embedded> <p class="Paragraph"><span class="T1">Syntax</span>:</p> <p class="Paragraph">Str (Expression) <help:key-word value="Str" tag="kw66564_1" xmlns:help="http://openoffice.org/2000/help"/></p> <p class="Paragraph"><span class="T1">Return value</span>:</p> <p class="Paragraph">String</p> <p class="Paragraph"><span class="T1">Parameter</span>:</p> <p class="Paragraph">Expression: Any numeric expression.</p> <p class="Paragraph">The <span class="T1">Str</span> function converts the result of a calculation or numeric variables to a string. Negative numbers are preceded by a minus sign. Note, however, that positive numbers are preceded by a space (instead of the plus sign).</p> <p class="P2">Example:</p> <p class="PropText">Sub ExampleStr</p> <p class="PropText">Dim iVar As Single</p> <p class="PropText">Dim sVar As String</p> <p class="PropText">iVar = 123.123</p> <p class="PropText">sVar = LTrim(Str(iVar))</p> <p class="PropText">Msgbox sVar & chr(13) <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>& Str(iVar)</p> <p class="PropText">end sub</p> <p class="PropText"/> </body></html>